package ningbo.day04.oop;

/**
 * @Author 宁铂
 * @Date 2021/7/18 10:01
 * @Version 1.0
 */
public class TestVariable2 {
    /** 本类测试成员变量与局部变量 */

    //定义成员变量
    String name;
    int age;

    public static void main(String[] args) {

        //定义局部变量
        String name1 = "ningbo";
        int age1 = 18;

        TestVariable2 testVariable2 = new TestVariable2();

        System.out.println(testVariable2.age);
        System.out.println(testVariable2.name);

        System.out.println(age1);
        System.out.println(name1);
    }
}
